# -*- coding: utf-8 -*-

BOT_NAME = 'spider'

SPIDER_MODULES = ['spiders']
NEWSPIDER_MODULE = 'spiders'

ROBOTSTXT_OBEY = False

# change cookie to yours
DEFAULT_REQUEST_HEADERS = {
    'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0',
    'Cookie': '_T_WM=832338b87adea9f198db0dc6a88888d8; H5_wentry=H5; WEIBOCN_WM=3349; backURL=https://weibo.cn/; SUB=_2A25MNAUZDeRhGedG6lYS8SfIzT2IHXVv1qtRrDV6PUJbktCOLXDXkW1NUW0vt5Pq0ZRF6xWnZ7qzgWFmDZXsjRgH; SUBP=0033WrSXqPxfM725Ws9jqgMF55529P9D9W5s6xTU0kYseMMdLDi7qi-e5NHD95Qp1h2Xe024ShqpWs4DqcjEi--ciKn4iKyFi--ciKLhi-iWi--NiK.Xi-2Ri--ciKnRi-zNeKnpShep1KBceHYpe0qt; SSOLoginState=1630565706'}

CONCURRENT_REQUESTS = 16

DOWNLOAD_DELAY = 3

DOWNLOADER_MIDDLEWARES = {
    'scrapy.downloadermiddlewares.cookies.CookiesMiddleware': None,
    'scrapy.downloadermiddlewares.redirect.RedirectMiddleware': None,
    'middlewares.IPProxyMiddleware': 100,
    'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware': 101,
}

ITEM_PIPELINES = {
    'pipelines.MongoDBPipeline': 300,
}

MONGO_HOST = '127.0.0.1'
MONGO_PORT = 27017
